package com.cxyzy.demo

import android.graphics.drawable.AnimationDrawable
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import kotlinx.android.synthetic.main.activity_frame.*

class FrameActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_frame)
        initView()
    }

    private fun initView() {
        val animationDrawable = iv.background as AnimationDrawable
        if (!animationDrawable.isRunning) {
            animationDrawable.start()
        }
    }
}
